import { xsEntity } from './commentity';
import { Column, Entity, OneToMany } from 'typeorm';
import { ShopEntity } from './shop';

/**
 * 描述
 */
@Entity()
export class ShopclassEntity extends xsEntity {
    @Column({ comment: '分类名' })
    name: string;
    @Column({ comment: '图片', default: null })
    img: string;
    @Column({ comment: '图标的颜色', default: null })
    color: string;


    @OneToMany(type => ShopEntity, photo => photo.shopclass) // note: we will create author property in the Photo class below
    shop: ShopEntity[];
}
